A mobile device may be a mobile phone, a personal digital assistant (PDA), a mobile computer, a digital camera, a mobile telecommunication device, a digital music player, a mobile handset, a handheld gaming device, a wireless mobile device, a pager, a portable computer, a tablet computer, a laptop computer, a digital calculator, a media player, an inventory control device, or any other device that can communicate via a mobile communication protocol. Although the present disclosure uses the mobile internet protocol (IP) communication protocol as an example, embodiments of the present disclosure may use other mobile communication protocols.
A mobile device can communicate via two IP addresses—a permanent home address, which is associated with the communication network in which the mobile device is initially registered, and a care-of address, which is associated with another communication network that the mobile device is visiting, or using for communication. The care-of address changes as the mobile device moves from communicating via one communication network to another. A home agent is a router that stores information about mobile devices whose permanent home address is registered in the home agent's communication network. A foreign agent is a router that stores information about mobile devices visiting its communication network. Foreign agents also convey care-of addresses for visiting mobile devices to the home agents that store the home addresses for these mobile devices.
An IP communication from a communication device to the mobile device initially uses the permanent home address of the mobile device as the destination address for sending IP packets. Because the home address logically belongs to the network associated with the mobile device's home agent, normal IP routing mechanisms forward these IP packets to the home agent. However, if the home agent is notified of a care-of address for the mobile device, the home agent redirects these IP packets towards the foreign agent that provided the care-of address instead of forwarding these IP packets to a destination that is physically in the same network as the home agent. The home agent looks for the care-of address in a table known as a binding table and then tunnels the IP packets to the mobile device's care-of address by appending a new IP header to the original IP packet, thereby preserving the original IP packet header. The foreign agent decapsulates IP packets at the end of the tunnel to remove the IP headers added by the home agent, and delivers the IP packets to the mobile device.
The mobile device may send IP packets directly to the communication device through the foreign agent, without sending the IP packets through the home agent, using its permanent home address as the source address for the IP packets. Using the home address for the source address while bypassing the home agent is known as triangular routing. In some networks, the foreign agent may employ “reverse tunneling” by tunneling the mobile device's IP packets to the home agent, which in turn forwards them to the communication device.
However, the use of a foreign agent is optional. Mobile IP communication protocol includes a mode of operation known as “co-located IP address”, which enables mobile device software to perform many of the equivalent roles of the foreign agent. This mode of operation is adopted when it is not possible to have foreign agent functionality, such as when using an existing packet data serving node (PDSN) or a roaming wireless local area network that does not support a foreign agent.